#include <stdio.h>
#include <string.h>
int main (){
	int cnt,i,j,t;
	char s[80];
	gets(s);
	cnt=strlen(s);
	for (i=0;i<cnt;i++){
		for (j=0;j<cnt-i-1;j++)
			if(s[j]>s[j+1]){
				t=s[j];
				s[j]=s[j+1];
				s[j+1]=t;
			}
	}
	puts (s);
	printf ("%d",cnt);
	return cnt;
}
